home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / mail / pine3.96.tar.gz / pine3.96.tar / pine3.96 / imap / non-ANSI / c-client / dummy.c < prev    next >
C/C++ Source or Header  |  1996-05-15  |  17KB  |  679 lines

  1. /*
  2.  * Program:    Dummy routines
  3.  *
  4.  * Author:    Mark Crispin
  5.  *        Networks and Distributed Computing
  6.  *        Computing & Communications
  7.  *        University of Washington
  8.  *        Administration Building, AG-44
  9.  *        Seattle, WA  98195
  10.  *        Internet: MRC@CAC.Washington.EDU
  11.  *
  12.  * Date:    9 May 1991
  13.  * Last Edited:    15 May 1996
  14.  *
  15.  * Copyright 1996 by the University of Washington
  16.  *
  17.  *  Permission to use, copy, modify, and distribute this software and its
  18.  * documentation for any purpose and without fee is hereby granted, provided
  19.  * that the above copyright notice appears in all copies and that both the
  20.  * above copyright notice and this permission notice appear in supporting
  21.  * documentation, and that the name of the University of Washington not be
  22.  * used in advertising or publicity pertaining to distribution of the software
  23.  * without specific, written prior permission.  This software is made
  24.  * available "as is", and
  25.  * THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  26.  * WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  27.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  28.  * NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  29.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  30.  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  31.  * (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  32.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  33.  *
  34.  */
  35.  
  36.  
  37. #include <stdio.h>
  38. #include <ctype.h>
  39. #include <errno.h>
  40. extern int errno;        /* just in case */
  41. #include "mail.h"
  42. #include "osdep.h"
  43. #include <pwd.h>
  44. #include <sys/stat.h>
  45. #include "dummy.h"
  46. #include "misc.h"
  47.  
  48. /* Dummy routines */
  49.  
  50.  
  51. /* Driver dispatch used by MAIL */
  52.  
  53. DRIVER dummydriver = {
  54.   "dummy",            /* driver name */
  55.   (DRIVER *) NIL,        /* next driver */
  56.   dummy_valid,            /* mailbox is valid for us */
  57.   dummy_parameters,        /* manipulate parameters */
  58.   dummy_find,            /* find mailboxes */
  59.   dummy_find_bboards,        /* find bboards */
  60.   dummy_find_all,        /* find all mailboxes */
  61.   dummy_find_all_bboards,    /* find all bboards */
  62.   dummy_subscribe,        /* subscribe to mailbox */
  63.   dummy_unsubscribe,        /* unsubscribe from mailbox */
  64.   dummy_subscribe_bboard,    /* subscribe to bboard */
  65.   dummy_unsubscribe_bboard,    /* unsubscribe from bboard */
  66.   dummy_create,            /* create mailbox */
  67.   dummy_delete,            /* delete mailbox */
  68.   dummy_rename,            /* rename mailbox */
  69.   dummy_open,            /* open mailbox */
  70.   dummy_close,            /* close mailbox */
  71.   dummy_fetchfast,        /* fetch message "fast" attributes */
  72.   dummy_fetchflags,        /* fetch message flags */
  73.   dummy_fetchstructure,        /* fetch message structure */
  74.   dummy_fetchheader,        /* fetch message header only */
  75.   dummy_fetchtext,        /* fetch message body only */
  76.   dummy_fetchbody,        /* fetch message body section */
  77.   dummy_setflag,        /* set message flag */
  78.   dummy_clearflag,        /* clear message flag */
  79.   dummy_search,            /* search for message based on criteria */
  80.   dummy_ping,            /* ping mailbox to see if still alive */
  81.   dummy_check,            /* check for new messages */
  82.   dummy_expunge,        /* expunge deleted messages */
  83.   dummy_copy,            /* copy messages to another mailbox */
  84.   dummy_move,            /* move messages to another mailbox */
  85.   dummy_append,            /* append string message to mailbox */
  86.   dummy_gc            /* garbage collect stream */
  87. };
  88.  
  89.                 /* prototype stream */
  90. MAILSTREAM dummyproto = {&dummydriver};
  91.  
  92. /* Dummy validate mailbox
  93.  * Accepts: mailbox name
  94.  * Returns: our driver if name is valid, NIL otherwise
  95.  */
  96.  
  97. DRIVER *dummy_valid (name)
  98.     char *name;
  99. {
  100.   char *s,tmp[MAILTMPLEN];
  101.   struct stat sbuf;
  102.                 /* must be valid local mailbox */
  103.   return (name && *name && (*name != '*') && (*name != '{') &&
  104.       (s = mailboxfile (tmp,name)) &&
  105.                 /* INBOX or empty file accepted */
  106.       (!*s || (!(stat (s,&sbuf) || sbuf.st_size))))
  107.     ? &dummydriver : NIL;
  108. }
  109.  
  110.  
  111. /* Dummy manipulate driver parameters
  112.  * Accepts: function code
  113.  *        function-dependent value
  114.  * Returns: function-dependent return value
  115.  */
  116.  
  117. void *dummy_parameters (function,value)
  118.     long function;
  119.     void *value;
  120. {
  121.   return NIL;
  122. }
  123.  
  124. /* Dummy find list of subscribed mailboxes
  125.  * Accepts: mail stream
  126.  *        pattern to search
  127.  */
  128.  
  129. void dummy_find (stream,pat)
  130.     MAILSTREAM *stream;
  131.     char *pat;
  132. {
  133.   void *s = NIL;
  134.   char *t;
  135.   if (*pat == '{') return;    /* local only */
  136.   if (t = sm_read (&s)) {     /* if have subscription database */
  137.     do if ((*t != '{') && (*t != '*') && pmatch (t,pat)) mm_mailbox (t);
  138.     while (t = sm_read (&s));    /* until no more subscriptions */
  139.   }
  140. }
  141.  
  142.  
  143. /* Dummy find list of subscribed bboards
  144.  * Accepts: mail stream
  145.  *        pattern to search
  146.  */
  147.  
  148. void dummy_find_bboards (stream,pat)
  149.     MAILSTREAM *stream;
  150.     char *pat;
  151. {
  152.   void *s = NIL;
  153.   char *t,tmp[MAILTMPLEN];
  154.   if (*pat == '{') return;    /* local only */
  155.                 /* no-op if have a subscription database */
  156.   if (t = sm_read (&s)) {    /* if have subscription database */
  157.     do if ((*t == '*') && (t[1] != '{') && pmatch (t+1,pat)) mm_bboard (t+1);
  158.     while (t = sm_read (&s));    /* read subscription database */
  159.   }
  160. }
  161.  
  162. /* Dummy find list of all mailboxes
  163.  * Accepts: mail stream
  164.  *        pattern to search
  165.  */
  166.  
  167. void dummy_find_all (stream,pat)
  168.     MAILSTREAM *stream;
  169.     char *pat;
  170. {
  171.   DIR *dirp;
  172.   struct direct *d;
  173.   char tmp[MAILTMPLEN],file[MAILTMPLEN];
  174.   char *s,*t;
  175.   int i = 0;
  176.   if (*pat == '{') return;    /* local only */
  177.   if (s = strrchr (pat,'/')) {    /* directory specified in pattern? */
  178.     strncpy (file,pat,i = (++s) - pat);
  179.     file[i] = '\0';        /* tie off prefix */
  180.                 /* make fully-qualified file name */
  181.     if (!(t = dummy_file (tmp,pat))) return;
  182.                 /* tie off directory name */
  183.     if (s = strrchr (t,'/')) *s = '\0';
  184.   }
  185.   else t = myhomedir ();    /* use home directory to search */
  186.   if (dirp = opendir (t)) {    /* now open that directory */
  187.     while (d = readdir (dirp))    /* for each directory entry */
  188.       if ((d->d_name[0] != '.') ||
  189.       (d->d_name[1] && ((d->d_name[1] != '.') || d->d_name[2]))) {
  190.     strcpy (file + i,d->d_name);
  191.     if (pmatch (file,pat)) mm_mailbox (file);
  192.       }
  193.     closedir (dirp);        /* flush directory */
  194.   }
  195.                 /* always an INBOX */
  196.   if (pmatch ("INBOX",pat)) mm_mailbox ("INBOX");
  197. }
  198.  
  199. /* Dummy find list of all bboards
  200.  * Accepts: mail stream
  201.  *        pattern to search
  202.  */
  203.  
  204. void dummy_find_all_bboards (stream,pat)
  205.     MAILSTREAM *stream;
  206.     char *pat;
  207. {
  208.   DIR *dirp;
  209.   struct direct *d;
  210.   struct passwd *pw;
  211.   char tmp[MAILTMPLEN],file[MAILTMPLEN];
  212.   int i = 1;
  213.   char *s;
  214.                 /* local only */
  215.   if ((*pat == '{') || !((pw = getpwnam ("ftp")) && pw->pw_dir)) return;
  216.   file[0] = '*';        /* bboard designator */
  217.                 /* directory specified in pattern? */
  218.   if (s = strrchr (pat,'/')) strncpy (file + 1,pat,i += (++s) - pat);
  219.   file[i] = '\0';        /* tie off prefix */
  220.   sprintf (tmp,"%s/%s",pw->pw_dir,(file[1] == '/') ? file + 2 : file + 1);
  221.   if (dirp = opendir (tmp)) {    /* now open that directory */
  222.     while (d = readdir (dirp))    /* for each directory entry */
  223.       if ((d->d_name[0] != '.') ||
  224.       (d->d_name[1] && ((d->d_name[1] != '.') || d->d_name[2]))) {
  225.     strcpy (file + i,d->d_name);
  226.     if (pmatch (file + 1,pat)) mm_bboard (file + 1);
  227.       }
  228.     closedir (dirp);        /* flush directory */
  229.   }
  230. }
  231.  
  232. /* Dummy subscribe to mailbox
  233.  * Accepts: mail stream
  234.  *        mailbox to add to subscription list
  235.  * Returns: T on success, NIL on failure
  236.  */
  237.  
  238. long dummy_subscribe (stream,mailbox)
  239.     MAILSTREAM *stream;
  240.     char *mailbox;
  241. {
  242.   char tmp[MAILTMPLEN];
  243.   return sm_subscribe (dummy_file (tmp,mailbox));
  244. }
  245.  
  246.  
  247. /* Dummy unsubscribe to mailbox
  248.  * Accepts: mail stream
  249.  *        mailbox to delete from subscription list
  250.  * Returns: T on success, NIL on failure
  251.  */
  252.  
  253. long dummy_unsubscribe (stream,mailbox)
  254.     MAILSTREAM *stream;
  255.     char *mailbox;
  256. {
  257.   char tmp[MAILTMPLEN];
  258.   return sm_unsubscribe (dummy_file (tmp,mailbox));
  259. }
  260.  
  261.  
  262. /* Dummy subscribe to bboard
  263.  * Accepts: mail stream
  264.  *        bboard to add to subscription list
  265.  * Returns: T on success, NIL on failure
  266.  */
  267.  
  268. long dummy_subscribe_bboard (stream,mailbox)
  269.     MAILSTREAM *stream;
  270.     char *mailbox;
  271. {
  272.   return NIL;            /* always fails */
  273. }
  274.  
  275.  
  276. /* Dummy unsubscribe to bboard
  277.  * Accepts: mail stream
  278.  *        bboard to delete from subscription list
  279.  * Returns: T on success, NIL on failure
  280.  */
  281.  
  282. long dummy_unsubscribe_bboard (stream,mailbox)
  283.     MAILSTREAM *stream;
  284.     char *mailbox;
  285. {
  286.   return NIL;            /* always fails */
  287. }
  288.  
  289. /* Dummy create mailbox
  290.  * Accepts: mail stream
  291.  *        mailbox name to create
  292.  *        driver type to use
  293.  * Returns: T on success, NIL on failure
  294.  */
  295.  
  296. long dummy_create (stream,mailbox)
  297.     MAILSTREAM *stream;
  298.     char *mailbox;
  299. {
  300.   char tmp[MAILTMPLEN];
  301.   int fd;
  302.   if ((fd = open (dummy_file (tmp,mailbox),O_WRONLY|O_CREAT|O_EXCL,
  303.           (int) mail_parameters (NIL,GET_MBXPROTECTION,NIL))) < 0) {
  304.     sprintf (tmp,"Can't create mailbox %s: %s",mailbox,strerror (errno));
  305.     mm_log (tmp,ERROR);
  306.     return NIL;
  307.   }
  308.   close (fd);            /* close the file */
  309.   return T;            /* return success */
  310. }
  311.  
  312.  
  313. /* Dummy delete mailbox
  314.  * Accepts: mail stream
  315.  *        mailbox name to delete
  316.  * Returns: T on success, NIL on failure
  317.  */
  318.  
  319. long dummy_delete (stream,mailbox)
  320.     MAILSTREAM *stream;
  321.     char *mailbox;
  322. {
  323.   char tmp[MAILTMPLEN];
  324.   if (unlink (dummy_file (tmp,mailbox))) {
  325.     sprintf (tmp,"Can't delete mailbox %s: %s",mailbox,strerror (errno));
  326.     mm_log (tmp,ERROR);
  327.     return NIL;
  328.   }
  329.   return T;            /* return success */
  330. }
  331.  
  332.  
  333. /* Mail rename mailbox
  334.  * Accepts: mail stream
  335.  *        old mailbox name
  336.  *        new mailbox name
  337.  * Returns: T on success, NIL on failure
  338.  */
  339.  
  340. long dummy_rename (stream,old,new)
  341.     MAILSTREAM *stream;
  342.     char *old;
  343.     char *new;
  344. {
  345.   char tmp[MAILTMPLEN],tmpnew[MAILTMPLEN];
  346.   if (rename (dummy_file (tmp,old),dummy_file (tmpnew,new))) {
  347.     sprintf (tmp,"Can't rename mailbox %s: %s",old,strerror (errno));
  348.     mm_log (tmp,ERROR);
  349.     return NIL;
  350.   }
  351.   return T;            /* return success */
  352. }
  353.  
  354. /* Dummy open
  355.  * Accepts: stream to open
  356.  * Returns: stream on success, NIL on failure
  357.  */
  358.  
  359. MAILSTREAM *dummy_open (stream)
  360.     MAILSTREAM *stream;
  361. {
  362.   int fd;
  363.   char err[MAILTMPLEN],tmp[MAILTMPLEN];
  364.   struct stat sbuf;
  365.                 /* OP_PROTOTYPE call */
  366.   if (!stream) return &dummyproto;
  367.   err[0] = '\0';        /* no error message yet */
  368.                 /* can we open the file? */
  369.   if ((fd = open (dummy_file (tmp,stream->mailbox),O_RDONLY,NIL)) < 0) {
  370.                 /* no, error unless INBOX */
  371.     if (strcmp (ucase (strcpy (tmp,stream->mailbox)),"INBOX"))
  372.       sprintf (err,"%s: %s",strerror (errno),stream->mailbox);
  373.   }
  374.   else {            /* file had better be empty then */
  375.     fstat (fd,&sbuf);        /* sniff at its size */
  376.     close (fd);
  377.     if (sbuf.st_size)        /* bogus format if non-empty */
  378.       sprintf (err,"%s (file %s) is not in valid mailbox format",
  379.            stream->mailbox,tmp);
  380.   }
  381.   if (!stream->silent) {    /* only if silence not requested */
  382.     if (err[0]) mm_log (err,ERROR);
  383.     else {
  384.       mail_exists (stream,0);    /* say there are 0 messages */
  385.       mail_recent (stream,0);    /* and certainly no recent ones! */
  386.     }
  387.   }
  388.   return err[0] ? NIL : stream;    /* return success if no error */
  389. }
  390.  
  391.  
  392. /* Dummy close
  393.  * Accepts: MAIL stream
  394.  */
  395.  
  396. void dummy_close (stream)
  397.     MAILSTREAM *stream;
  398. {
  399.                 /* return silently */
  400. }
  401.  
  402. /* Dummy fetch fast information
  403.  * Accepts: MAIL stream
  404.  *        sequence
  405.  */
  406.  
  407. void dummy_fetchfast (stream,sequence)
  408.     MAILSTREAM *stream;
  409.     char *sequence;
  410. {
  411.   fatal ("Impossible dummy_fetchfast");
  412. }
  413.  
  414.  
  415. /* Dummy fetch flags
  416.  * Accepts: MAIL stream
  417.  *        sequence
  418.  */
  419.  
  420. void dummy_fetchflags (stream,sequence)
  421.     MAILSTREAM *stream;
  422.     char *sequence;
  423. {
  424.   fatal ("Impossible dummy_fetchflags");
  425. }
  426.  
  427.  
  428. /* Dummy fetch envelope
  429.  * Accepts: MAIL stream
  430.  *        message # to fetch
  431.  *        pointer to return body
  432.  * Returns: envelope of this message, body returned in body value
  433.  */
  434.  
  435. ENVELOPE *dummy_fetchstructure (stream,msgno,body)
  436.     MAILSTREAM *stream;
  437.     long msgno;
  438.     BODY **body;
  439. {
  440.   fatal ("Impossible dummy_fetchstructure");
  441.   return NIL;
  442. }
  443.  
  444.  
  445. /* Dummy fetch message header
  446.  * Accepts: MAIL stream
  447.  *        message # to fetch
  448.  * Returns: message header in RFC822 format
  449.  */
  450.  
  451. char *dummy_fetchheader (stream,msgno)
  452.     MAILSTREAM *stream;
  453.     long msgno;
  454. {
  455.   fatal ("Impossible dummy_fetchheader");
  456.   return NIL;
  457. }
  458.  
  459. /* Dummy fetch message text (only)
  460.     body only;
  461.  * Accepts: MAIL stream
  462.  *        message # to fetch
  463.  * Returns: message text in RFC822 format
  464.  */
  465.  
  466. char *dummy_fetchtext (stream,msgno)
  467.     MAILSTREAM *stream;
  468.     long msgno;
  469. {
  470.   fatal ("Impossible dummy_fetchtext");
  471.   return NIL;
  472. }
  473.  
  474.  
  475. /* Dummy fetch message body as a structure
  476.  * Accepts: Mail stream
  477.  *        message # to fetch
  478.  *        section specifier
  479.  * Returns: pointer to section of message body
  480.  */
  481.  
  482. char *dummy_fetchbody (stream,m,sec,len)
  483.     MAILSTREAM *stream;
  484.     long m;
  485.     char *sec;
  486.     unsigned long *len;
  487. {
  488.   fatal ("Impossible dummy_fetchbody");
  489.   return NIL;
  490. }
  491.  
  492.  
  493. /* Dummy set flag
  494.  * Accepts: MAIL stream
  495.  *        sequence
  496.  *        flag(s)
  497.  */
  498.  
  499. void dummy_setflag (stream,sequence,flag)
  500.     MAILSTREAM *stream;
  501.     char *sequence;
  502.     char *flag;
  503. {
  504.   fatal ("Impossible dummy_setflag");
  505. }
  506.  
  507.  
  508. /* Dummy clear flag
  509.  * Accepts: MAIL stream
  510.  *        sequence
  511.  *        flag(s)
  512.  */
  513.  
  514. void dummy_clearflag (stream,sequence,flag)
  515.     MAILSTREAM *stream;
  516.     char *sequence;
  517.     char *flag;
  518. {
  519.   fatal ("Impossible dummy_clearflag");
  520. }
  521.  
  522. /* Dummy search for messages
  523.  * Accepts: MAIL stream
  524.  *        search criteria
  525.  */
  526.  
  527. void dummy_search (stream,criteria)
  528.     MAILSTREAM *stream;
  529.     char *criteria;
  530. {
  531.                 /* return silently */
  532. }
  533.  
  534.  
  535. /* Dummy ping mailbox
  536.  * Accepts: MAIL stream
  537.  * Returns: T if stream alive, else NIL
  538.  * No-op for readonly files, since read/writer can expunge it from under us!
  539.  */
  540.  
  541. long dummy_ping (stream)
  542.     MAILSTREAM *stream;
  543. {
  544.   char tmp[MAILTMPLEN];
  545.   MAILSTREAM *test = mail_open (NIL,stream->mailbox,OP_PROTOTYPE);
  546.                 /* swap streams if looks like a new driver */
  547.   if (test && (test->dtb != stream->dtb))
  548.     test = mail_open (stream,strcpy (tmp,stream->mailbox),NIL);
  549.   return test ? T : NIL;
  550. }
  551.  
  552.  
  553. /* Dummy check mailbox
  554.  * Accepts: MAIL stream
  555.  * No-op for readonly files, since read/writer can expunge it from under us!
  556.  */
  557.  
  558. void dummy_check (stream)
  559.     MAILSTREAM *stream;
  560. {
  561.   dummy_ping (stream);        /* invoke ping */
  562. }
  563.  
  564.  
  565. /* Dummy expunge mailbox
  566.  * Accepts: MAIL stream
  567.  */
  568.  
  569. void dummy_expunge (stream)
  570.     MAILSTREAM *stream;
  571. {
  572.                 /* return silently */
  573. }
  574.  
  575. /* Dummy copy message(s)
  576.     s;
  577.  * Accepts: MAIL stream
  578.  *        sequence
  579.  *        destination mailbox
  580.  * Returns: T if copy successful, else NIL
  581.  */
  582.  
  583. long dummy_copy (stream,sequence,mailbox)
  584.     MAILSTREAM *stream;
  585.     char *sequence;
  586.     char *mailbox;
  587. {
  588.   fatal ("Impossible dummy_copy");
  589.   return NIL;
  590. }
  591.  
  592.  
  593. /* Dummy move message(s)
  594.     s;
  595.  * Accepts: MAIL stream
  596.  *        sequence
  597.  *        destination mailbox
  598.  * Returns: T if move successful, else NIL
  599.  */
  600.  
  601. long dummy_move (stream,sequence,mailbox)
  602.     MAILSTREAM *stream;
  603.     char *sequence;
  604.     char *mailbox;
  605. {
  606.   fatal ("Impossible dummy_move");
  607.   return NIL;
  608. }
  609.  
  610. /* Dummy append message string
  611.  * Accepts: mail stream
  612.  *        destination mailbox
  613.  *        optional flags
  614.  *        optional date
  615.  *        stringstruct of message to append
  616.  * Returns: T on success, NIL on failure
  617.  */
  618.  
  619. long dummy_append (stream,mailbox,flags,date,message)
  620.     MAILSTREAM *stream;
  621.     char *mailbox;
  622.     char *flags;
  623.     char *date;
  624.                 STRING *message;
  625. {
  626.   struct stat sbuf;
  627.   int fd = -1;
  628.   int e;
  629.   char tmp[MAILTMPLEN];
  630.   if ((strcmp (ucase (strcpy (tmp,mailbox)),"INBOX")) &&
  631.        ((fd = open (dummy_file (tmp,mailbox),O_RDONLY,NIL)) < 0)) {
  632.     if ((e = errno) == ENOENT) {/* failed, was it no such file? */
  633.       mm_notify (stream,"[TRYCREATE] Must create mailbox before append",NIL);
  634.       return NIL;
  635.     }
  636.     sprintf (tmp,"%s: %s",strerror (e),mailbox);
  637.     mm_log (tmp,ERROR);        /* pass up error */
  638.     return NIL;            /* always fails */
  639.   }
  640.   else if (fd >= 0) {        /* found file? */
  641.     fstat (fd,&sbuf);        /* get its size */
  642.     close (fd);            /* toss out the fd */
  643.     if (sbuf.st_size) {        /* non-empty file? */
  644.       sprintf (tmp,"Indeterminate mailbox format: %s",mailbox);
  645.       mm_log (tmp,ERROR);
  646.       return NIL;
  647.     }
  648.   }
  649.   return (*default_proto ()->dtb->append) (stream,mailbox,flags,date,message);
  650. }
  651.  
  652.  
  653. /* Dummy garbage collect stream
  654.  * Accepts: mail stream
  655.  *        garbage collection flags
  656.  */
  657.  
  658. void dummy_gc (stream,gcflags)
  659.     MAILSTREAM *stream;
  660.     long gcflags;
  661. {
  662.                 /* return silently */
  663. }
  664.  
  665. /* Dummy mail generate file string
  666.  * Accepts: temporary buffer to write into
  667.  *        mailbox name string
  668.  * Returns: local file string
  669.  */
  670.  
  671. char *dummy_file (dst,name)
  672.     char *dst;
  673.     char *name;
  674. {
  675.   char *s = mailboxfile (dst,name);
  676.                 /* return our standard inbox */
  677.   return (s && !*s) ? strcpy (dst,sysinbox ()) : s;
  678. }
  679.